package com.yuwenxin.servlet.controller.music;

import com.yuwenxin.bean.Music;
import com.yuwenxin.service.MusicService;
import com.yuwenxin.service.impl.MusicServiceImpl;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

public class MusicPlayController extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        doPost(req,resp);
    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        MusicService service = new MusicServiceImpl();
        try {
            Music music = service.findMusicByName("情书");  //
        } catch (Exception e) {
            e.printStackTrace();
        }
        System.out.println();
    }
}
